package cloud.code.baseProject.entity;

import java.io.Serializable;
import java.util.List;

/**
 * 通用树结构
 * Created by zhanghaichao on 2019/5/9.
 */
public class DevOrgTree implements Serializable, Cloneable {
    private static final long serialVersionUID = 2170168525584568514L;

    /**
     * 节点id
     */
    private String nodeId;

    /**
     * 父节点id
     */
    private String nodePid;

    /**
     * 节点名称
     */
    private String nodeName;

    /**
     * 节点类型 根据不同业务规定
     */
    private Integer nodeType;

    /**
     * 组织id
     */
    private String orgId;

    /**
     * 是否可选 true是不可选false是可选
     */
    private Boolean disabled = false;

    /**
     * 每个节点的唯一标识
     */
    private String nodeUUid;

    /**
     * 用于表示当前层级 越往上越大
     */
    private Integer treeLevel;

    /**
     * 子节点列表
     */
    private List<DevOrgTree> children;

    /**
     * 自定义信息
     */
    private String message;

    /**
     * 是否挂载false没有true已经挂载过了
     */
    private Boolean hangOn = false;


    @Override
    public DevOrgTree clone() {
        DevOrgTree o = null;
        try {
            //Object中的clone()识别出你要复制的是哪一个对象
            o = (DevOrgTree) super.clone();
        } catch (CloneNotSupportedException e) {
            System.out.println(e.toString());
        }
        return o;
    }

    public Boolean getHangOn() {
        return hangOn;
    }

    public void setHangOn(Boolean hangOn) {
        this.hangOn = hangOn;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getTreeLevel() {
        return treeLevel;
    }

    public void setTreeLevel(Integer treeLevel) {
        this.treeLevel = treeLevel;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getNodePid() {
        return nodePid;
    }

    public void setNodePid(String nodePid) {
        this.nodePid = nodePid;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public Integer getNodeType() {
        return nodeType;
    }

    public void setNodeType(Integer nodeType) {
        this.nodeType = nodeType;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public String getNodeUUid() {
        return nodeUUid;
    }

    public void setNodeUUid(String nodeUUid) {
        this.nodeUUid = nodeUUid;
    }

    public List<DevOrgTree> getChildren() {
        return children;
    }

    public void setChildren(List<DevOrgTree> children) {
        this.children = children;
    }
}
